package com.ybkj.chat.module.main.activity;

import android.view.View;
import android.widget.TextView;

import com.ybkj.chat.R;
import com.ybkj.chat.base.BaseMvpActivity;
import com.ybkj.chat.ui.adapter.LocationListAdapter;
import com.ybkj.chat.ui.view.recyclerview.DividerItemDecoration;
import com.ybkj.chat.ui.view.recyclerview.XRecyclerView;
import com.ybkj.chat.utils.ResourcesUtil;

import butterknife.BindView;
import butterknife.OnClick;

/**
 * 所在位置
 */
public class locationActivity extends BaseMvpActivity {


    @BindView(R.id.left_tv)
    TextView leftTv;
    @BindView(R.id.title)
    TextView title;
    @BindView(R.id.right_tv)
    TextView rightTv;
    //获取的地址列表
    @BindView(R.id.location_recycle)
    XRecyclerView locationRecycle;

    private LocationListAdapter listAdapter;

    @Override
    protected void injectPresenter() {

    }

    @Override
    protected void initTitle() {

    }

    @Override
    protected int getLayoutId() {
        return R.layout.activity_location;
    }

    @Override
    protected void initView() {
        leftTv.setText(ResourcesUtil.getString(R.string.cancel));
        title.setText(ResourcesUtil.getString(R.string.location));
        rightTv.setText(ResourcesUtil.getString(R.string.finish));
    }

    @Override
    protected void initData() {
        locationRecycle.addItemDecoration(new DividerItemDecoration(mContext, DividerItemDecoration.VERTICAL_LIST, 1,
                ResourcesUtil.getColor(R.color.activity_background)));
        listAdapter = new LocationListAdapter(mContext);
        listAdapter.addData("1");
        listAdapter.addData("1");
        listAdapter.addData("1");
        listAdapter.addData("1");
        listAdapter.addData("1");
        listAdapter.bindToRecyclerView(locationRecycle);
    }


    @OnClick({R.id.left_tv, R.id.right_tv})
    public void onViewClicked(View view) {
        switch (view.getId()) {
            case R.id.left_tv:
                finish();
                break;
            case R.id.right_tv:
                break;
        }
    }

}
